package com.itcast.service;

import com.itcast.dao.UserDao;
import com.itcast.dao.UserDaoImpl;
import com.itcast.pojo.User;

import java.util.List;

public class UserServiceImpl implements UserService {
    private UserDao userDao=  new UserDaoImpl();
    @Override
    public User findUserByUserIdAndPassword(String userId, String password) {
        return userDao.findUserByUserIdAndPassword(userId,password);
    }

    @Override
    public void InsertUser(User user) {
        userDao.InsertUser( user);
    }

    @Override
    public User findByUserId(String userId) {
        return userDao.findByUserId(userId);
    }

    @Override
    public List<User> findAllUser() {
        return userDao.findAllUser();
    }

    @Override
    public void UpdateUser(User user) {
        userDao.UpdateUser(user);
    }
}
